package com.heima.article.job;

import com.heima.article.service.ApArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class HotArticleComputeJob {
    @Autowired
    private ApArticleService service;

    @XxlJob("computeHotArticleJob")
    public void computeHotArticleJob(){
        log.info("**********计算热点文章begin**********");
        service.computeHotArticleJob();
        log.info("***********计算热点文章end***********");
    }
}
